<?php
class IG_View_Helper_DwzPanelBar extends Zend_View_Helper_HtmlElement
{
    public function dwzPanelBar(array $buttons)
    {
        $html = '<div class="panelBar"><ul class="toolBar">';
        foreach ($buttons as $value => $attrs) {
            if (is_int($value)) {
                $value = $attrs;
                $attrs = array();
            }
            if ($value == 'line') {
                $html .= '<li class="line">line</li>';
            } else {
                $html .= '<li><a '
                       . (is_string($attrs) ? $attrs : $this->_htmlAttribs($attrs))
                       . '><span>' . $value . '</span></a></li>';
            }
        }
        $html .= '</ul></div>';
        return $html;
    }
}